﻿<Window x:Class="WpfSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Ultimate Answer" Height="200" Width="500">
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter1" />
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Text="Answer to the Ultimate Question of Life, the Universe and Everything " TextAlignment="Center" FontSize="14" />
        <TextBox Name="answer" Grid.Row="1" TextAlignment="Center" FontSize="14" Text="{Binding Path=Answer}" />
        <Button Grid.Row="2" Content="Find answer" FontSize="14" Command="{Binding Path=UltimateAnswerCommand}"  />
        <Button Grid.Row="3" Content="I changed my mind" FontSize="14" Command="{Binding Path=UltimateAnswerCommand.CancelCommand}"  />
        <ProgressBar Grid.Row="4" Name="progressBar1" Value="{Binding Path=UltimateAnswerCommand.Progress, Mode=OneWay}" />
    </Grid>
</Window>
